package com.jm.springboot21.service.impl;

import com.jm.springboot21.mapper.StudentMapper;
import com.jm.springboot21.pojo.Student;
import com.jm.springboot21.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentService;
    @Override
    public List<Student> findAll() {
        return studentService.findAll();
    }

    @Override
    public void addStudent(Student student) {
    studentService.addStudent(student);
    }

    @Override
    public Student findById(int id) {
        return studentService.findById(id);
    }

    @Override
    public List<Student> findByName(String name) {
        return studentService.findByName(name);
    }

    @Override
    public void deleteById(int id) {
    studentService.deleteById(id);
    }

    @Override
    public void deleteByIds(List<Integer> ids) {
    studentService.deleteByIds(ids);
    }

    @Override
    public void updateById(Student student) {
    studentService.updateById(student);
    }

    @Override
    public Integer count() {
        return studentService.count();
    }
}
